<template>
  <div class="top-left">
    <div v-for="(item, index) in lists" :key="index" class="item">
      <div class="left">
        <span class="bg" :class="[
            { yellow: index == 0 },
            { blue: index == 1 },
            { red: index == 2 },
          ]">No.{{ index + 1 }}</span>
        <span>{{ item.name }}</span>
      </div>
      <div class="progress" :style="`width:${item.percentage}%`">
      </div>
      <div class="num">{{ item.num }}</div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      lists: [
        {
          name: "医用X线摄像系统", num: "1523, 12", percentage: 90
        },
        { name: "经颅磁刺激器及脑导航定位系统", num: "1402,87", percentage: 80 },
        { name: "液相色谱离子阱飞行时间质谱联用仪", num: "1282,87", percentage: 70 },
        { name: "多通道肌电记录系统", num: "1152,90", percentage: 60 },
        { name: "小动物分子影像分析仪-CT", num: "1002,23", percentage: 50 },
        { name: "磁刺激定位导航系统", num: "9312,3", percentage: 40 },
        { name: "128导脑电记录仪", num: "6512,1", percentage: 30 },
      ]
    }
  }
}

</script>

<style lang="less" scoped>
  .top-left {
    padding: 5px 24px 0 0;
    .item {
      position: relative;
      width: 100%;
      font-size: 16px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #ffffff;
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
      padding-bottom: 10px;
      border-bottom: 5px solid rgba(255, 255, 255, 0.2);
      .progress {
        position: absolute;
        bottom: -5px;
        height: 5px;
        background: linear-gradient(90deg, rgba(255, 106, 58, 0.35) 0%, #ffd03b 100%);
        &:after {
          content: '';
          position: absolute;
          right: 0;
          top: -2px;
          width: 3px;
          height: 12px;
          background: #edf4ff;
        }
      }
      .left {
        .bg {
          padding: 4px 12px 4px 6px;
          height: 33px;
          color: #ffffff !important;
          &.yellow {
            background: linear-gradient(90deg, #ffd03b 0%, rgba(255, 208, 59, 0.09) 100%);
          }
          &.blue {
            background: linear-gradient(90deg, #d9e7ff 0%, rgba(217, 231, 255, 0.2) 100%);
          }
          &.red {
            background: linear-gradient(90deg, #ff6a3a 0%, rgba(255, 106, 58, 0.2) 100%);
          }
        }
      }
      .num {
        font-size: 16px;
        font-family: RobotoCondensed-Regular, RobotoCondensed;
        font-weight: 400;
        color: #ffd93d;
      }
    }
  }
</style>
